From: Bartosz DziewoƄski Date: Thu, 21 Jan 2016 22:56:16 +0000 (+0100) Subject: UploadFromStash: Only remove stashed file on successful uploads X-Git-Tag: 1.31.0-rc.0~8253^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=fba745b359ce020e30281997c4b271c7a3b0fe79;p=lhc%2Fweb%2Fwiklou.git UploadFromStash: Only remove stashed file on successful uploads Also, makes code shorter! Change-Id: I144d8a207c753bd9e38ac847a0fc61257f11e54d --- diff --git a/includes/upload/UploadFromStash.php b/includes/upload/UploadFromStash.php index 75540c1de7..1276842365 100644 --- a/includes/upload/UploadFromStash.php +++ b/includes/upload/UploadFromStash.php @@ -178,17 +178,10 @@ class UploadFromStash extends UploadBase { } /** - * Perform the upload, then remove the database record afterward. - * @param string $comment - * @param string $pageText - * @param bool $watch - * @param User $user - * @return Status + * Remove the database record after a successful upload. */ - public function performUpload( $comment, $pageText, $watch, $user ) { - $rv = parent::performUpload( $comment, $pageText, $watch, $user ); + public function postProcessUpload() { + parent::postProcessUpload(); $this->unsaveUploadedFile(); - - return $rv; } }